<template>
	<view>
		<button @click="goPage" type="primary">收货地址</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		onLoad() {
			// uni.getProvider({
			// 	service: 'oauth',
			// 	success:(result)=> {
			// 		console.log(result)
			// 	}
			// })
			// let openId = uni.getStorageSync('openId')
			// console.log(openId)
			// if(!openId) {
			// 	uni.login({
			// 		success(res) {
			// 			console.log(res)
			// 			const {code} = res
			// 			uni.request({
			// 				url:"http://localhost:3000/users/wxlogin",
			// 				method:"POST",
			// 				data: {
			// 					code
			// 				},
			// 				success(result) {
			// 					const {openid, session_key} = result
			// 					uni.setStorageSync('openId', openid)
			// 				}
			// 			})
			// 		}
			// 	})
			// }
		},
		onShareAppMessage() {
			return {
				title: '自定义分享的标题',
				path: '/pages/my/my',
				imageUrl: 'https://t7.baidu.com/it/u=1595072465,3644073269&fm=193&f=GIF',
				content: '自定义分享的内容',
				desc: '自定义分享描述',
				bgImgUrl: '@/common/images/bdQrcode.png'
			}
		},
		methods: {
			async getAddress() {
				const address = uniCloud.importObject('address')
				let res = await address.getAddress()
				uni.showModal({
					content: JSON.stringify(res),
					showCancel: false
				});
			},
			goPage() {
				uni.navigateTo({
					url: '/pages/address/address'
				})
			}
		}
	}
</script>

<style>

</style>